#ifndef TANKDRIVE_H
#define TANKDRIVE_H

#include "WPILib.h"
#include "Transmission.h"

//------------------------------------------------------------------------------
// DEFINE TankDrive CLASS
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
class TankDrive
{
	public:
		static const int kLeftWheels  = 1;
		static const int kRightWheels = 2;
		TankDrive();
		TankDrive(UINT8 sideCarModule, UINT32 rRearMotorCh, UINT32 rFrontMotorCh
		                             , UINT32 lRearMotorCh, UINT32 lFrontMotorCh);
		TankDrive(UINT8 sideCarModule, UINT32 rRearMotorCh, UINT32 rFrontMotorCh
		                             , UINT32 lRearMotorCh, UINT32 lFrontMotorCh
		                             , UINT32 lEncoderChA, UINT32 lEncoderChB
		                             , UINT32 rEncoderChA, UINT32 rEncoderChB);
		TankDrive(UINT32 rRearMotorCh, UINT32 rFrontMotorCh, UINT32 lRearMotorCh
		                             , UINT32 lFrontMotorCh, UINT32 lEncoderChA
		                             , UINT32 lEncoderChB, UINT32 rEncoderChA
		                             , UINT32 rEncoderChB);
		TankDrive(UINT32 lEncoderChA , UINT32 lEncoderChB, UINT32 rEncoderChA
		                             , UINT32 rEncoderChB);
		~TankDrive();
		void    ResetWheelEncoders();
		void    SetDriveMotors(int tranSpeed, float leftJSThrottle
                                            , float rightJSThrottle);
		void    StopMotors();
		float   GetMotorSpeed(int wheelSide);
		double  GetDistance(int wheelSide);
		void    SetDistancePerPulse(float WHEEL_DIST_PER_PULSE);

	protected:
		Talon   	 *pDriveRightRear;
		Talon   	 *pDriveRightFront;
		Talon   	 *pDriveLeftRear;
		Talon   	 *pDriveLeftFront;
		Encoder 	 *pRightEncoder;
		Encoder 	 *pLeftEncoder;
		Transmission *pTransmission;
};
#endif
